package com.utils;

/**
 * Created by 淡漠Vip on 2018/1/6.
 * Email: itdreamlmc@163.com
 */
public class BeanRGB {

    private Integer pixel;

    private Integer r;

    private Integer g;

    private Integer b;

    public BeanRGB(Integer pixel) {
        this.pixel = pixel;
        this.r = (pixel & 0xff0000) >> 16; //r
        this.g = (pixel & 0xff00) >> 8; //g
        this.b = (pixel & 0xff); //b
    }

    public Integer getPixel() {
        return pixel;
    }

    public void setPixel(Integer pixel) {
        this.pixel = pixel;
    }

    public Integer getR() {
        return r;
    }

    public void setR(Integer r) {
        this.r = r;
    }

    public Integer getG() {
        return g;
    }

    public void setG(Integer g) {
        this.g = g;
    }

    public Integer getB() {
        return b;
    }

    public void setB(Integer b) {
        this.b = b;
    }
}
